package com.heima.feign.wemedia;

import com.heima.feign.config.DefaultFeignConfiguration;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 自媒体端feign客户端
 */
@FeignClient(value = "leadnews-wemedia", configuration = DefaultFeignConfiguration.class)
public interface IWemediaClient {


    @PostMapping("/api/v1/wm_user/save")
    ResponseResult saveWmUser(@RequestBody WmUser wmUser);


    @GetMapping("/api/v1/wm_user/findWmUserById")
    ResponseResult findWmUserById(@RequestParam("id") Integer id);


    @GetMapping("/api/v1/channel/list")
    public ResponseResult getChannels();

    /**
     * 审核评论的文本内容是否合规
     * @param text
     * @return
     */
    @GetMapping("/api/v1/comment/content_scan")
    public Boolean isTextScanOk(@RequestParam String text);
}
